package com.longcai.fenzhuang.fuyou;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.longcai.bean.ApiResult;
import com.longcai.entity.order.ClyjGoodsOrderDetails;
import com.longcai.entity.payment.fuyou.request.ClyjFuyouBankcardChange;
import com.longcai.entity.payment.fuyou.request.ClyjFuyouCompanyRegister;
import com.longcai.entity.payment.fuyou.request.ClyjFuyouLinePayOrder;
import com.longcai.entity.payment.fuyou.request.ClyjFuyouRecharge;
import com.longcai.entity.payment.fuyou.request.ClyjFuyouRefund;
import com.longcai.entity.payment.fuyou.request.ClyjFuyouSmallcompanyRegister;
import com.longcai.entity.payment.fuyou.request.ClyjFuyouSubamountRule;
import com.longcai.entity.payment.fuyou.request.ClyjFuyouWeixinRecord;
import com.longcai.entity.payment.fuyou.request.ClyjFuyouWithdraw;
import com.longcai.fenzhuang.fuyou.entity.SplistRechargeRequest;
import com.longcai.fenzhuang.fuyou.entity.SplitImportRuleRequest;
import com.longcai.fenzhuang.fuyou.entity.SplitPayRequest;
import com.longcai.fenzhuang.fuyou.entity.SplitPrivateUserRegisterInfoRequest;
import com.longcai.fenzhuang.fuyou.entity.SplitQueryDealRequest;
import com.longcai.fenzhuang.fuyou.entity.SplitRefundRequest;
import com.longcai.fenzhuang.fuyou.entity.SplitRuleDetail;
import com.longcai.fenzhuang.fuyou.entity.SplitSubAmountRequest;
import com.longcai.fenzhuang.fuyou.entity.SplitUpdateUserRequest;
import com.longcai.fenzhuang.fuyou.entity.SplitUserRegisterInfoRequest;
import com.longcai.fenzhuang.fuyou.utils.HttpUtil;
import com.longcai.fenzhuang.fuyou.utils.ImgHelper;
import com.longcai.fenzhuang.fuyou.utils.SendPost;
import com.longcai.fenzhuang.fuyou.utils.Signa;
import com.longcai.fenzhuang.fuyou.utils.SplitConstant;
import com.longcai.fenzhuang.fuyou.utils.Utils;
import com.longcai.vo.ClyjGoodsOrderDetailsVo;



public class FuyouCommonPortMethod {
	private Logger logger = LoggerFactory.getLogger(getClass());

	/***
	 * 富友企业注册接口方法
	 * @param cfcr
	 * @return
	 */
	public BaseResponse CommonRegister(ClyjFuyouCompanyRegister cfcr){
		try {
			FuiouHttpPoster post = new FuiouHttpPoster();
			post.setCharset("utf-8");
			post.setUrl(SplitConstant.ADD_USER);

			SplitUserRegisterInfoRequest req = new SplitUserRegisterInfoRequest();
			req.setVer("0.44");
			req.setMchntCd("0002900F1001919");
			req.setMchntTxnSsn(Utils.getTimeStr());
			req.setRem("开户测试demo");
			req.setCustNm(cfcr.getCustName());
			req.setBrandName(cfcr.getBrandName());
			req.setUnifiedCode(cfcr.getUnifiedCode());
			req.setBusinessLicense(cfcr.getBusinessLicen());
			req.setLicenseIndate(cfcr.getLicenseIndate());
			req.setTaxNum(cfcr.getTaxNum());
			req.setCompanyOrgNum(cfcr.getCompanyOrgNum());
			req.setArtifNm(cfcr.getArtifNm());
			req.setContact(cfcr.getContact());
			req.setCertifId(cfcr.getCertifId());
			req.setMobileNo(cfcr.getMobileNo());
			req.setEmail(cfcr.getEmail());
			req.setBankLicense(cfcr.getBankLicense());
			req.setCityId(cfcr.getCityId());
			req.setParentBankId(cfcr.getParentBankId());
			req.setBankNm(cfcr.getBankNm());
			req.setCapacntno(cfcr.getCapacntNo());
			req.setAgreement(cfcr.getAgreement());
			req.setAccessory1("1111");
			req.setAccessory2(cfcr.getAccessory2());
			/*	String str = req.getArtifNm() + "|"
						 + req.getBankLicense()+ "|" 
							 + req.getMchntCd()+ "|" 
						 + req.getMchntTxnSsn() + "|" 
						 + req.getBankNm() + "|"
						 + req.getBrandName() + "|"
						 + req.getCapacntno() + "|"
						 + req.getCertifId() + "|"
						 + req.getCityId() + "|"
						 + req.getTaxNum() + "|"
						 + req.getLicenseIndate() + "|"
						 + req.getCustNm() + "|" + req.getVer();*/
			String signa = FuiouRsaCipher.sign2Base64(SplitConstant.PRI_SIGN_KEY, req.getSecret());
			req.setSignature(signa);
			System.out.println("发送报文：" + JSON.toJSONString(req));
			String res = post.newPost(JSON.toJSONString(req));
			System.out.println(res);
			BaseResponse resr = JSON.parseObject(res, BaseResponse.class);
			BaseResponse r=JSON.parseObject(resr.getObj(),BaseResponse.class);
			String backSigna=resr.getSignature();
			boolean b=FuiouRsaCipher.verifySign(SplitConstant.PUB_SIGN_KEY, res,backSigna);
			if(b){
				return r;
			}
		} catch (Exception e) {
			e.printStackTrace();
		}
		return null;
	}
	/**富友小微企业注册接口方法*/
	public BaseResponse SmallCommonRegister(ClyjFuyouSmallcompanyRegister cfcr){
		try {
			FuiouHttpPoster post = new FuiouHttpPoster();
			post.setCharset("utf-8");
			post.setUrl(SplitConstant.ADD_PRI_USER);

			SplitPrivateUserRegisterInfoRequest req = new SplitPrivateUserRegisterInfoRequest();
			req.setVer("0.44");
			req.setMchntCd("0002900F1001919");
			req.setMchntTxnSsn(Utils.getTimeStr());
			req.setRem("小微企业开户测试demo");
			req.setArtifNm(cfcr.getArtifNm());
			req.setBankNm(cfcr.getBankNm());
			req.setCapAcntNo(cfcr.getCapacntNo());
			req.setCertifId(cfcr.getCertifId());
			req.setCertifType(cfcr.getCertifType());
			req.setCityId(cfcr.getCityId());
			req.setCapAcntNo(cfcr.getCapacntNo());
			req.setEmail(cfcr.getEmail());
			req.setMobileNo(cfcr.getMobileNo());
			req.setParentBankId(cfcr.getParentBankid());
			//			req.setAccessory1(ImgHelper.encodeImage("C:\\Users\\user\\Desktop\\timg.jpg"));
			//			req.setAccessory2(ImgHelper.encodeImage("C:\\Users\\user\\Desktop\\timg (1).jpg"));
			//			req.setAccessory3(ImgHelper.encodeImage("C:\\Users\\user\\Desktop\\timg (1).jpg"));
			req.setAccessory1(cfcr.getCardFront());
			req.setAccessory2(cfcr.getCardBehind());
			req.setAgreement("1");

			String str = req.getArtifNm() + "|"
					+ req.getMchntCd()+ "|" 
					+ req.getMchntTxnSsn() + "|" 
					+ req.getBankNm() + "|"
					+ req.getCertifId() + "|"
					+ req.getCityId() + "|"
					+ req.getMobileNo() + "|" + req.getVer();
			String signa = FuiouRsaCipher.sign2Base64(SplitConstant.PRI_SIGN_KEY, str);
			req.setSignature(signa);
			String res = post.newPost(JSON.toJSONString(req));
			System.out.println(res);
			BaseResponse resr = JSON.parseObject(res, BaseResponse.class);
			BaseResponse r=JSON.parseObject(resr.getObj(),BaseResponse.class);
			String backSigna=resr.getSignature();
			//boolean b=FuiouRsaCipher.verifySign(SplitConstant1.PUB_SIGN_KEY, res,backSigna);
			if(true){
				return r;
			}
		} catch (Exception e) {
			e.printStackTrace();
		}
		return null;
	}
	/**富友提現接口方法*/
	public BaseResponse withdraw(ClyjFuyouWithdraw cfwd){
		try {
			FuiouHttpPoster post = new FuiouHttpPoster();
			post.setCharset("utf-8");
			post.setUrl(SplitConstant.WITHDRAW);

			//			SplistWithdrawRequest req = new SplistWithdrawRequest();
			//			req.setMchntCd("0002900F1001919");
			//			String s=Utils.getTimeStr();
			//			System.out.println(s+"----");
			//			req.setMchntTxnSsn(s);
			//			req.setLoginId("19920000379");
			//			req.setAmt("1");
			//			req.setVer("0.44");
			//			req.setBackNotifyUrl("www.baidu.com");
			//			req.setChannel("1");
			//			req.setPageNotifyUrl("www.baidu.com");
			//			req.setRem("提现demo");
			//			String str = req.getSecret();
			//			System.out.println(str);		
			//			String signa = FuiouRsaCipher.sign2Base64(SplitConstant.PRI_SIGN_KEY, str);
			//			System.out.println(signa);
			//
			//			System.out.println(str);	
			Map<String, String> map = new HashMap<String, String>();
			map.put("mchntCd", "0002900F1001919");
			map.put("mchntTxnSsn",Utils.getTimeStr());
			map.put("loginId", cfwd.getLoginId());
			map.put("amt", cfwd.getAmt());
			map.put("ver", "0.44");
			map.put("backNotifyUrl", "www.baidu.com");
			map.put("channel", cfwd.getChannel());
			map.put("pageNotifyUrl", "www.baidu.com");
			map.put("rem", "提现demo");
			Signa sg=new Signa();
			String str=sg.getCashSigna("0002900F1001919", map.get("loginId"), map.get("amt"), "www.baidu.com", "www.baidu.com", "0.44");
			System.out.println("签名加密后"+str);
			map.put("signature", str);
			HttpUtil http = new HttpUtil();
			System.out.println(JSON.toJSONString(map)+"---------------------------------------------");
			String res = http.doPost(SplitConstant.WITHDRAW,map);
			System.out.println(res);
			BaseResponse resr = JSON.parseObject(res, BaseResponse.class);
			BaseResponse r=JSON.parseObject(resr.getObj(),BaseResponse.class);
			String backSigna=resr.getSignature();
			boolean b=FuiouRsaCipher.verifySign(SplitConstant.PUB_SIGN_KEY, res,backSigna);
			if(b){
				return r;
			}
		} catch (Exception e) {
			e.printStackTrace();
		}
		return null;
	}
	/**富友微信支付接口方法*/
	public BaseResponse LinePay(ClyjFuyouLinePayOrder cflp){
		try {
			FuiouHttpPoster post = new FuiouHttpPoster();
			post.setCharset("utf-8");
			post.setUrl(SplitConstant.WX_PAY);
			SplitPayRequest req = new SplitPayRequest();
			req.setMchntCd("0002900F1001919");
			req.setMchntTxnSsn(Utils.getTimeStr());
			req.setPaymentType(cflp.getPaymentType());
			req.setChannel(cflp.getChannel());
			req.setIntoAccount(cflp.getIntoAccount());
			req.setSubOpenid(cflp.getSubOpenid());
			req.setSubAppid(cflp.getSubAppid());
			req.setPurpose("05");
			req.setAmt(cflp.getAmt());
			req.setGoodsType(cflp.getGoodsType());
			req.setSubject(cflp.getSubject());
			req.setGoodsDes(cflp.getGoodsDes());
			req.setTermIp(cflp.getTermIp());
			req.setNotifyUrl(cflp.getNotifyUrl());
			req.setVer("0.44");
			req.setOrderType(cflp.getOrderType());
			req.setReserveddeviceInfo(cflp.getReserveddevicenifo());
			req.setSplitType("0");
			req.setSplitSsn(cflp.getSplitSsn());
			String str = req.getIntoAccount() + "|" + req.getMchntTxnSsn() + "|" + req.getMchntCd() + "|" + req.getPaymentType() + "|"
					+ req.getTermIp() + "|" + req.getAmt();
			System.out.println(str);		
			String signa = FuiouRsaCipher.sign2Base64(SplitConstant.PRI_SIGN_KEY, str);
			req.setSignature(signa);
			String res = post.newPost(JSON.toJSONString(req));
			System.out.println(res);
			BaseResponse resr = JSON.parseObject(res, BaseResponse.class);
			BaseResponse r=JSON.parseObject(resr.getObj(),BaseResponse.class);
			String backSigna=resr.getSignature();
			//boolean b=FuiouRsaCipher.verifySign(SplitConstant1.PUB_SIGN_KEY, res,backSigna);
			if(true){
				return r;
			}
		} catch (Exception e) {
			e.printStackTrace();
			logger.error("支付失败");
		}
		return null;
	}
	/**富友充值接口方法*/
	public BaseResponse recharge(ClyjFuyouRecharge cfr){
		try {
			FuiouHttpPoster post = new FuiouHttpPoster();
			post.setCharset("utf-8");
			post.setUrl(SplitConstant.EBANK_RECHARGE);

			SplistRechargeRequest req = new SplistRechargeRequest();
			req.setMchntCd("0002900F1001919");
			req.setMchntTxnSsn(Utils.getTimeStr());
			req.setChannel("1");
			req.setAmt(cfr.getAmt());
			// 需要替换成自己的回调地址
			req.setPageNotifyUrl(cfr.getPageNotifyUrl());// 
			req.setBackNotifyUrl(cfr.getBackNotifyUrl());
			//			req.setPageNotifyUrl("www.baidu.com");// 
			//			req.setBackNotifyUrl("www.baidu.com");
			req.setLoginId(cfr.getLoginId());
			req.setVer("0.44");

			String str = req.getMchntCd() + "|"
					+ req.getLoginId() + "|" 
					+ req.getAmt() + "|"
					+ req.getPageNotifyUrl() + "|" 
					+ req.getBackNotifyUrl();
			System.out.println(str);
			System.out.println();
			String signa = FuiouRsaCipher.sign2Base64(SplitConstant.PRI_SIGN_KEY, str);
			System.out.println(signa);
			System.out.println();
			req.setSignature(signa);
			String res = post.newPost(JSON.toJSONString(req));
			System.out.println("发送报文：" + JSON.toJSONString(req));
			BaseResponse resr = JSON.parseObject(res, BaseResponse.class);
			BaseResponse r=JSON.parseObject(resr.getObj(),BaseResponse.class);
			String backSigna=resr.getSignature();
			boolean b=FuiouRsaCipher.verifySign(SplitConstant.PUB_SIGN_KEY, res,backSigna);
			if(b){
				return r;
			}
		} catch (Exception e) {
			e.printStackTrace();
		}
		return null;
	}
	/**富友退款接口方法*/
	public BaseResponse refund(ClyjFuyouRefund cfr){
		try {
			FuiouHttpPoster post = new FuiouHttpPoster();
			post.setCharset("utf-8");
			post.setUrl(SplitConstant.WX_REFUND);

			SplitRefundRequest req = new SplitRefundRequest();
			req.setMchntCd("0002900F1001919");
			req.setMchntTxnSsn(Utils.getTimeStr());
			req.setVer("0.44");
			req.setMchntTxnNum(cfr.getMchntTxnNum());
			req.setRefundAmt(cfr.getAmt());
			req.setRefundReason(cfr.getRefundReason());
			req.setRebates("");
			req.setAmt(cfr.getAmt());
			req.setOrderType(cfr.getOrderType());
			req.setPaymentType(cfr.getPaymentType());
			String str = req.getMchntCd() + "|"
					+ req.getMchntTxnNum() + "|" 
					+ req.getAmt() + "|"
					+ req.getRefundAmt() + "|" 	
					+ req.getMchntTxnSsn();

			String signa = FuiouRsaCipher.sign2Base64(SplitConstant.PRI_SIGN_KEY, str);
			req.setSignature(signa);
			System.out.println(JSON.toJSONString(req));
			String res = post.newPost(JSON.toJSONString(req));
			System.out.println(res);
			BaseResponse resr = JSON.parseObject(res, BaseResponse.class);
			BaseResponse r=JSON.parseObject(resr.getObj(),BaseResponse.class);
			String backSigna=resr.getSignature();
			boolean b=FuiouRsaCipher.verifySign(SplitConstant.PUB_SIGN_KEY, res,backSigna);
			if(b){
				return r;
			}

		} catch (Exception e) {
			e.printStackTrace();
		}
		return null;

	}
	/**富友银行卡变更接口方法*/
	public BaseResponse bankCardChange(ClyjFuyouBankcardChange cfbc){
		try {
			FuiouHttpPoster post = new FuiouHttpPoster();
			post.setCharset("utf-8");
			post.setUrl(SplitConstant.UPDATE_USER);

			SplitUpdateUserRequest req = new SplitUpdateUserRequest();
			req.setMchntCd("0002900F1001919");
			req.setMchntTxnSsn(Utils.getTimeStr());
			req.setVer("0.44");
			req.setArtifNm(cfbc.getArtifNm());
			req.setBankLicense(cfbc.getBankLicense());
			req.setLoginId(cfbc.getLoginId());
			req.setCapacntno(cfbc.getCapacntno());
			req.setParentBankId(cfbc.getParentBankid());
			req.setBankNm(cfbc.getBanknNm());
			req.setCityId(cfbc.getCityId());
			req.setUserType(cfbc.getUserType());
			req.setMobileNo(cfbc.getMobileNo());
			req.setCustNm(cfbc.getCustNm());
			String str = req.getArtifNm() + "|"
					+ req.getBankLicense()+ "|" 
					+ req.getMchntCd()+ "|" 
					+ req.getMchntTxnSsn() + "|" 
					+ req.getLoginId() + "|"
					+ req.getCapacntno() + "|" 
					+ req.getParentBankId() + "|" 
					+ req.getCityId() + "|" 
					+ req.getUserType() + "|" 
					+ req.getMobileNo() + "|" 
					+ req.getVer();
			String signa = FuiouRsaCipher.sign2Base64(SplitConstant.PRI_SIGN_KEY, str);
			req.setSignature(signa);
			System.out.println("发送报文：" + JSON.toJSONString(req));
			String res=post.newPost(JSON.toJSONString(req));
			BaseResponse resr = JSON.parseObject(res, BaseResponse.class);
			BaseResponse r=JSON.parseObject(resr.getObj(),BaseResponse.class);
			String backSigna=resr.getSignature();
			//boolean b=FuiouRsaCipher.verifySign(SplitConstant1.PUB_SIGN_KEY, res,backSigna);
			if(true){
				return r;
			}
		} catch (Exception e) {
			e.printStackTrace();
		}
		return null;

	}
	/**
	 * 富友分账导入接口方法
	 * @param list 
	 * @param cfsr
	 * @return
	 */
	public BaseResponse subamountRuleImport(ClyjGoodsOrderDetailsVo clyjGoodsOrderDetailsVo){
		try {
			FuiouHttpPoster post = new FuiouHttpPoster();
			post.setCharset("utf-8");
			post.setUrl(SplitConstant.ADD_RULE);
			SplitImportRuleRequest req = new SplitImportRuleRequest();
			List<ClyjGoodsOrderDetails> list= clyjGoodsOrderDetailsVo.getClyjGoodsOrderDetails();

			req.setMchntCd("0002900F1001919");
			req.setMchntTxnSsn(Utils.getTimeStr());
			req.setSplitCause("需要分账");
			req.setSplitStartTime("2019-03-22");
			req.setAutoSplit("1");
			req.setVer("0.44");
			req.setSubType(""); // 1-固定优先，在分余额，不填则默认为0-按规则进行分账
			List<SplitRuleDetail> splitInfo = new ArrayList<SplitRuleDetail>();
			for (ClyjGoodsOrderDetails clyjGoodsOrderDetails : list) {
				SplitRuleDetail detail = new SplitRuleDetail();
				detail.setSplitAccount(clyjGoodsOrderDetails.getMchId());//入账户
				detail.setSplitAmt(clyjGoodsOrderDetails.getPayAmount().toString());//固定值
				detail.setSplitScale("0");//比例固定值2选1
				//detail.setContractName(cfsr.getContractName());//合同名称
				detail.setStartDate("2018-12-07");//合同开始日期
				detail.setEndDate("2019-12-07");//合同结束日期
				/*detail.setParticipant(cfsr.getParticipant());//合同参与方
					detail.setContractSsn(cfsr.getContractSsn());//合同编号
					detail.setAccessory1(ImgHelper.encodeImage(cfsr.getBusinessContract()));//商户合同
					detail.setAccessory2(ImgHelper.encodeImage(cfsr.getSubaccountContract()));*///富友分账合同
				detail.setPriorityLev("99");// 分账级别，0优先级最高，999优先级最小，不填默认99
				splitInfo.add(detail);

			}
			req.setSplitInfo(splitInfo);
			String str = req.getMchntCd() + "|" + req.getAutoSplit();
			String signa = FuiouRsaCipher.sign2Base64(SplitConstant.PRI_SIGN_KEY, str);
			req.setSignature(signa);
			String res = post.newPost(JSON.toJSONString(req));
			System.out.println("sssssss====>>应答" + res);
			BaseResponse resr = JSON.parseObject(res, BaseResponse.class);
			BaseResponse r=JSON.parseObject(resr.getRuleInfo(),BaseResponse.class);
			String backSigna=resr.getSignature();
			//boolean b=FuiouRsaCipher.verifySign(SplitConstant1.PUB_SIGN_KEY, res,backSigna);
			if(true){
				return r;
			}
		} catch (Exception e) {
			e.printStackTrace();
		}
		return null;
	}
	/**\
	 * 富友分账实现方法
	 * @param clyjGoodsOrderDetailsVo
	 * @param cflp
	 * @return
	 */
	public BaseResponse subamount (ClyjGoodsOrderDetailsVo clyjGoodsOrderDetailsVo, ClyjFuyouLinePayOrder cflp){
		try {
			FuiouHttpPoster post = new FuiouHttpPoster();
			post.setCharset("utf-8");
			post.setUrl(SplitConstant.SUB_ACCOUNT);

			SplitSubAmountRequest req = new SplitSubAmountRequest();
			req.setMchntCd("0002900F1001919");
			req.setMchntTxnSsn(Utils.getTimeStr());
			req.setSplitSsn(clyjGoodsOrderDetailsVo.getSplitSsn());
			req.setMchntTxnNum(cflp.getMchntTxnSsn());
			req.setVer("0.44");
			String str = req.getMchntCd() + "|"
					+ req.getSplitSsn() + "|" + req.getMchntTxnNum();

			String signa = FuiouRsaCipher.sign2Base64(SplitConstant.PRI_SIGN_KEY, str);
			req.setSignature(signa);
			String res = post.newPost(JSON.toJSONString(req));
			System.out.println(res);
			BaseResponse resr = JSON.parseObject(res, BaseResponse.class);
			BaseResponse r=JSON.parseObject(resr.getObj(),BaseResponse.class);
			if(r!=null){
				return r;
			}
		} catch (Exception e) {
			e.printStackTrace();
		}
		return null;
	}
	public List<JSONObject> weiXinRecord(ClyjFuyouWeixinRecord cfwr){
		try {
			SplitQueryDealRequest req = new SplitQueryDealRequest();
			req.setMchntCd("0002900F1001919");
			req.setMchntTxnSsn(Utils.getTimeStr());
			req.setTradeType(cfwr.getTradeType());
			req.setPayType(cfwr.getPayType());
			req.setStartDay(cfwr.getStartDay());
			req.setEndDay(cfwr.getEndDay());
			req.setMchntTxnNum(cfwr.getMchntTxnNum());
			req.setCustNo(cfwr.getCustNo());
			req.setPageNo("1");
			req.setPageSize("10");
			req.setVer("0.44");
			String Secret=req.getSecret();
			System.out.println(Secret+"-------------------------------------------");
			String signa = FuiouRsaCipher.sign2Base64(SplitConstant.PRI_SIGN_KEY, Secret);
			System.out.println(signa+"************");
			req.setSignature(signa);
			SendPost s= new SendPost();
			System.out.println(JSON.toJSONString(req));
			System.out.println();
			String ss=s.post(SplitConstant.QUERY_DEAL_LOG, JSON.toJSONString(req));
			BaseResponse r = JSON.parseObject(ss, BaseResponse.class);
			String list = r.getList();

			List<JSONObject> parse = (List<JSONObject>) JSONArray.parse(list);
			r.setTotalNumber(r.getTotalNumber());
			r.setRespCode(r.getRespCode());
			System.out.println(r.toString());
			System.out.println(r.toString());
			String backSigna=r.getSignature();
			System.out.println(backSigna+"******************");
			//boolean b=FuiouRsaCipher.verifySign(SplitConstant.PUB_SIGN_KEY, Secret,backSigna);
			if(true){
				return parse;
			}
		} catch (Exception e) {
			logger.error("查询失败");
			e.printStackTrace();
		}
		return null;
	}
}
